function [ sSum, BCX, BCY ] = calcOpenPolygon( contourX, contourY )
s = sqrt((diff(contourX)).^2 + (diff(contourY)).^2);
sSum = sum(s);
BCX = sum(0.5*(contourX(1:end-1) + contourX(2:end)) .* s) / sSum;
BCY = sum(0.5*(contourY(1:end-1) + contourY(2:end)) .* s) / sSum;
end